Copyright: Fax Resource Print-2-Image®1995 RPN/RPI


Help Contents
Contents

Print-2-Image Overview

The Faxable Way to Print

Who can use Print-2-Image?

Add Fax Imaging to your applications

The Fax Resource Product Suite

Print-2-Image's Fax Printer Driver for Windows

Print-2-Image's ShowFax Image Viewer for Windows

Installation

Technical Support

What You Will Need

What's on the Disks

To Install Print-2-Image Automatically

Verifying your Installation

Quick Start

Using Print-2-Image from a Windows Application

Special Paper Size features

Print-2-Image's Fax Printer Driver

What Is An Image?

Understanding Image File Formats

Personalized User Settings

The P2IMAGE.INI file

Sample P2IMAGE.INI file

Personal Options -- The Four Sections

File Formats: Page numbering and File names

Viewing your image files -- or -- Transferring Control

Print-2-Image's ShowFax Viewer

Running ShowFax on Workstations

Using ShowFax

Using the File menu:

Using the Edit Menu

Using the Page menu

Using Zoom (magnification)

Using the Tools menu

Text Annotation Techniques

Selecting, Re-sizing and Moving Annotated Objects

Using the Options menu

Appendix A: Technical Overview and API

How Print-2-Image works

Set Parameters Functions

Get Parameters Functions

AppModeAction function

GetImageInfo function

What is the P2IMAGE.INI file?

Sample P2IMAGE.INI file

INI Section: PrintModeOptions

PrintModeOptions: API_ parameter constants

INI Section: Print-2-Image-Main

Print-2-Image-Main: API_ parameter constants

INI Section: FileOptions

FileOptions: API_ parameter constants

INI Section: AutoFileMode

AutoFileMode: API_ parameter constants

INI Section: ImageOverlay

ImageOverlay: API_ parameter constants

INI Section: Output and API_ parameter constants

How does P-2-I launch an External Process like ShowFax in PrintMode option 2?

Appendix B:  Manual Installation

Technical Support

To Install Print-2-Image Manually

Appendix C: Questions and Answers (Q&A)

Installation Questions

QuarkXPress Desktop Publishing Software

Complex Graphics

External Applications and API


The Faxable Way to Print

Fax Resource® from Resource Partners, Inc. is a sophisticated Network Fax Product Suite, providing advanced e-mail features, transparent operation and very competitive pricing.

Fax Resource offers site-wide Windows, DOS, MAC and OS/2 users easy single-instance and broadcast faxing, and operates over any server-based or peer-to-peer network.

Fax Resource Print-2-Image™ is actually two products in one!  Print-2-Image is the versatile Print-2-Image™ fax printer driver for Windows that creates fax-ready images in many popular image file formats, combined with ShowFax™, a Windows executable to view and annotate fax images.


Who can use Print-2-Image?

If your company develops custom Windows applications, then you probably need to integrate fax and imaging into your systems.  In addition, all of the following fax technologies need an easy and reliable way to create images -- and Print-2-Image is the answer.

♦	Image Management and Archiving

♦	Fax-On-Demand (F-O-D)

♦	Fax-Back

♦	Integrated Voice Response (IVR)

♦	Communication Tool kits

♦	E-Mail and Fax Distribution Systems

Print-2-Image also connects to the Fax Resource Network Series fax server and E-Mail Gateways for cc:Mail, MS Mail and WordPerfect / Novell Perfect Office.

Print-2-Image easily integrates with any Windows programming environment  -- just set the current printer to Print-2-Image on FAX and print.  The image format and resolution, paper size, orientation, and other features are easily programmable.  Print-2-Image can also be mail-enabled for VIM and MAPI support.


Add Fax Imaging to your applications

Print-2-Image can be integrated into programs built with the leading application development tools including:

•	Microsoft's FoxPro, Visual Basic, Visual C++, and Access®

•	Powersoft's PowerBuilder®

•	Gupta's SQLWindows®


The Fax Resource Product Suite

Integrated Fax Solutions

E-Mail Gateway Solutions

Productivity Products


Integrated Fax Solutions

♦	Fax Resource Network Series	-- Our flagship, multi-platform fax server

♦	Fax Resource ACFI interface	-- Mainframe and Mini fax connectivity

♦	Fax Resource Librarian	-- Manage and archive documents using MS Access®


E-Mail Gateway Solutions

♦	Fax Resource E-Mail Gateway for cc:Mail

♦	Fax Resource E-Mail Gateway for MS Mail

♦	Fax Resource E-Mail Gateway for WordPerfect / Novell Office


Productivity Products

♦	Fax Resource Print-2-Image (or P-2-I)

♦	Fax Resource ShowFax

♦	Fax Resource MAC Fax Viewer

♦	Fax Resource Postscript Attachment Conversion Module

♦	Fax Resource cc:Fax Add-On Pack

♦	Fax Resource Fax Information Retrieval Manager

♦	Fax Resource Fax MailBox Manager


Print-2-Image's Fax Printer Driver for Windows

Fax Resource Print-2-Image™ (P-2-I) is a powerful print-to-image program.  Installed as a Windows printer driver, you can turn the output of any Windows program (i.e., a Word document, Corel Draw diagram, a Lotus spreadsheet) into "fax-ready" image files.

If you've worked in Windows, or if you've used a fax board under Windows, you know how easy it is to select a printer from the "Printer Setup" menu within any Windows program.  By selecting Print-2-Image on FAX as your printer,  you can easily create a fax image file(s) in a directory of your choice.

Your spreadsheets or documents may look great on paper, but if you want to fax your documents, you must create a hard copy and walk to the fax machine.  Print-2-Image removes that extra step -- it creates a faxable image from the source document on your PC with no lost resolution, no wasted time, and no wasted paper.

Once you have the image files, you can submit them by fax using e-mail packages like cc:Mail, MS Mail and WordPerfect / Novell Office, or as image attachments with most communications packages.  Of course, you can also use the Fax Resource Network Series fax server and e-mail gateways to submit the images!

Print-2-Image provides you with complete control over where the image is created on your hard drive, what filename is used, and which file format the images are generated as.

Related Topics:

Print To File mode

Automating Print To File mode

Session Manager mode

Supported Formats: Single and Multiple-pages


Print To File mode

If you just want to create fax image files, then use Print-2-Image's Print To File mode.

In Print To File mode, before any image files are created, you are presented with a dialog box where you must enter file details for the current print session.

After printing your document to Print-2-Image on Fax, the Print To File dialog box is displayed.  Now, all you have to do is select the directory, file name and image file format for the new image and click on the OK push-button.

Tip: A default file name is supplied to you based upon the source document's file name.


Automating Print To File mode

If you need to automate the file naming process, the Print To File dialog box step can be completely by-passed by using Print-2-Image's UseAutoFileMode option.

When UseAutoFileMode is turned on, every time you print a document, the file name is set using the value in the AutoFileName field.  If the AutoFileName is blank, then Print-2-Image will generate a file name for you by using the source document's file name with the appropriate image file format extension.

With Print To File mode, all image options are set before a print session has started.  Typically, you would use Windows - Printer Setup to change the settings.  In addition, more sophisticated users and developers can programmatically update the P2IMAGE.INI file to control file names and formats.

With Print To File mode, it is very important to note that once a Print Session has started, (i.e. From Word, you clicked on "Print"), all options are fixed and cannot be changed.


Session Manager mode

With Session Manager mode, after you print your document to Print-2-Image on Fax, your custom application (written in VB, Access, C++, FoxPro, PowerBuilder or SQLWindows) is automatically launched.

At the same time, a Print-2-Image Session is activated and a Session dialog box appears as a minimized icon in Windows.

In Session Manager mode, your application can control the following Session-based options:

•	Image - File Name and directory

•	Image - File Format

•	Image - Resolution (Fax Fine or Standard)

•	Image - (TIFF) Fill Order Least Significant Bit (for GammaLink support)

•	Image - Always rename Single page images

•	Image - Use Custom Page Length

•	Image - Custom Page Length in Pixels

•	Overlay - Use Image Overlay feature

•	Overlay - Only the First Page, or Every Page

•	Overlay - Display Warnings on Dimension mismatches

•	Overlay - Overlay Image file name

•	ShowProgress will image is being created

•	Mode-2 Messaging API Type

Tip 1: The source application that was used to print the document is suspended for as long as the Print Session is active, (i.e. while the Print-2-Image Session icon is visible), and various Session-based options are available.

Tip 2: To abort an active Print Session, simply close the Session icon.  Of course, your custom application can also issue an API function call to Print-2-Image to close the Session.


Supported Formats: Single and Multiple-pages

Print-2-Image supports all the leading fax image formats including:

Image File Format	Single or Multi-page
♦ DCX (INTEL® CAS)	Multi-page PCX
♦ Tiff T4, CCITT Group 3-1D and 2D	Multi-page TIFF
♦ Tiff T6, CCITT Group 4-1D	Multi-page TIFF
♦ Tiff T4, CCITT Group 3-1D and 2D (IFO)	Multi-page TIFF
♦ Tiff T6, CCITT Group 4-1D (IFO)	Multi-page TIFF
♦ PCX (INTEL® CAS)	Single-page PCX
♦ Tiff GAMMA® Group 3 1D and 2D	Single-page TIFF
♦ Tiff Group 4 1D	Single-page TIFF
♦ Tiff Huffman CCITT, & Uncompressed	Single-page TIFF
♦ BMP - Windows® bitmap	Single-page BMP


Print-2-Image's ShowFax Image Viewer for Windows

Related Topics:

Not Just View... Annotate!


Not Just View... Annotate!

Fax Resource ShowFax™ (ShowFax) is a Windows executable program.  Optimized for speed, ShowFax lets you display and manipulate almost any single-page or multi-page image file including fax formats PCX, DCX, and TIFF.  ShowFax can be launched from any application and be used to open or close selected documents using documented Windows messages.

With ShowFax, specific annotation features include the ability to add text notes in any Windows font to the image, in an opaque or transparent frame, with visible or hidden borders.  Additional tools include arrows and frames.  Pages can also be added or removed at will (such as a cover page of a fax received), copied to the clipboard and pasted on a different image, or copied to any Windows application.  ShowFax even allows you to clean-up a fax image with an eraser-like tool.

Other ShowFax options include long and short menus; hidden, floating or fixed toolbar; and image enhancement.  Annotated images can be saved as two separate files, with annotations saved as re-editable objects, or they can be merged permanently into the original image.  To make an image from ShowFax, simply specify the file name and a supported file format including: Group 3 TIFF, Group 4 TIFF (compressed), and DCX. Once displayed, the image can be rotated (4 ways), zoomed (3 levels, + fit in frame width), and annotated.


Installation - Technical Support
Technical Support

♦	For technical support, product and order information, contact

Resource Partners North

2157 Marc Lane, Suite 100

Burlington, Ontario  L7M 3W6  Canada

tel.  905-336-2872

fax. 905-336-3158

CompuServe: 74347,164


What You Will Need

The Print-2-Image setup diskette contains a setup program, INSTALL.EXE, that will install Print-2-Image's program files, README information and sample source code.

To use Print-2-Image, you will need the following:

•	Microsoft Windows release 3.1 or higher

•	At least  2 MB of RAM (4 MB is preferable)


What's on the Disks

The INSTALL.EXE program installs the following files:

Files copied to the Print-2-Image home directory

File	Description
readme.txt	The latest information -- please read this file
showfax.exe	Fax Resource ShowFax image viewer
vbp2iapi.zip	Sample API source code for Microsoft Visual Basic (pkzip 2.04g)
pprtr4.zip	Printer control toolkit (evaluation edition) from Silent O Software
Files copied to the Windows\System directory

File	Description
faxil.drv	Windows fax printer driver used by Print-2-Image
transcod.dll	Imaging Subsystem for Print-2-Image
ctl3d.dll	Dynamic Link Library used by Windows
p2irpn4.dll	Dynamic Link Library used by Print-2-Image
vbrun300.dll	Dynamic Link Library used by Microsoft Visual Basic

Tip: A P2IMAGE.INI file will be automatically created in your Windows directory.  This file controls your personalized,  user Default settings.


To Install Print-2-Image Automatically

INSTALL.EXE

1.	Place diskette 1 of 1 into drive B:

Tip 1:  Read the README.TXT file for the latest suggestions and updates.

2.	From the Windows Program Manager, click File and Choose Run.  (You can also do this from the File Manager).

3.	When the dialog box appears, type B:\INSTALL, as show below:

4.	Run INSTALL.EXE and enter the directory where you want to install Print-2-Image.

By default, Print-2-Image will attempt to create and install into the directory: C:\P2IMAGE4

5.	Click on Continue and Print-2-Image will install the required files on your PC.

6.	Finally, the install process will create a P2IMAGE.INI file in your Windows directory.  In addition, the following will be automatically added to your Windows WIN.INI file:

[Print-2-Image]

UserLib=C:\P2IMAGE4\P2IRPN4.DLL

[PrinterPorts]

Print-2-Image=FAXIL,FAX,15,45

[devices]

Print-2-Image=FAXIL,FAX

Tip:  For a more detailed description of the install process, and information on the P2IMAGE.INI file, please refer to the Appendices for Technical Information.


Verifying your Installation

Control Panel

List of Available Printers for Windows applications

Print-2-Image - Setup screen


Control Panel

1.	After the setup is completed, go to the Windows - Control Panel and click on the Printers icon.  A list of available printer drivers will be displayed.


List of Available Printers for Windows applications

2.	To see the Print-2-Image - Setup screen: From the Windows Available Printers dialog box, select the Installed Printer : Print-2-Image on FAX and click on the Setup push-button.


Print-2-Image - Setup screen

3.	The Print-2-Image - Setup dialog box is displayed.  This screen allows you to see and  change your personal P-2-I printer configuration settings.

4.	Click on the OK push-button to save your personal Print-2-Image printer settings in the P2IMAGE.INI file, or Cancel to exit the screen without making changes.


Using Print-2-Image from a Windows Application

1.	From your word processor or from within any Windows program, simply select the printer driver -- Print-2-Image on FAX -- from your list of available Windows printers and print your document.

2.	By default, the Print To File mode is turned on.  This setting is available by entering the Printer Setup option.

3.	By default, the UseAutoFileMode feature is turned off, and the following Print To File dialog box is displayed for you to specify a file name and image file format for the new file(s).

Tip: A default file name is supplied to you based upon the source document's file name.

4.	Type the file name for your new image file and select an image file format from the List Files of Type drop-down list box.

Tip:  the three character file extension does NOT control the image file format.

5.	Select the OK push-button to start creating the fax images, or Cancel to abort.

6.	If the View Image on Completion option is selected, this new fax image will be automatically displayed in the ShowFax image viewer.

7.	That's it!  Your fax-ready image file has been created in the specified directory.

Tip:  File Naming Convention: When printing a multiple-page source document using a single-page image file format (TIFF, PCX, or BMP), the files created will be named automatically using the first 4 letters of the file name that you supplied + "p" + 3 digit page numbers.

E.g.  You want to Print-2-Image a two-page source document to TIFF files. If you supply YOURFILE.TIF as a File Name, the image files created will be:  YOURp001.TIF, YOURp002.TIF


Special Paper Size features

Create CAS Logos

Create Fax Banners using Paper Size


Create CAS Logos

A CAS Logo is the image that appears on top of a Fax Coversheet if you are using a CAS-compatible fax product.  The process to create a CAS Logo can be very difficult and time-consuming.  The dimensions of  the image can be no larger than 1728 x 800 pixels (about 8 1/2 x 4 inches).

Before printing your document from a word processor or graphics package, simply check the Use Custom Length option in P-2-I's printer setup and enter a number for the Page length in Pixels (800 is perfect for CAS logos).  The image created will be exactly 1728 x 800 pixels.


Create Fax Banners using Paper Size

RamPage - This double-page paper size (8 1/2 x 22 inches) was especially designed for RamPage Publishing.  This large image will produce a "fax banner" when transmitted to an older style fax machine that uses rolled fax paper.


What Is An Image?

Overview

Resolution

Scanners and dithering

Compression


Overview

The following is a brief overview to Imaging.  A fax machine or document scanner can take a picture of a piece of paper and save this picture as an image file.  To display the "image" on your video screen, the image must be stored in a computerized format, and computers understand 1's and 0's (binary).  So, the computer stored an image as a series of black(1) and white(0) dots.


Resolution

Image quality is commonly expressed in Dots Per Inch (DPI).  You may be familiar with the DPI term since your laser printer probably uses 300 DPI. to print a page.  The more dots in your image, the clearer and sharper the resolution of the image.

An international standard for the resolution of fax transmissions dictates that an image can be  at most 200 DPI.  A fax machine scans at approximately 200 DPI across the page, and an 8 1/2 inch wide page will produce 1728 dots on each line.


Scanners and dithering

The first, most popular type of scanner was the Photocopier.  The photocopier takes a picture of the piece of paper and prints it over and over again.  If the source document is black and white, then the photocopier has an easy time making an image.  But what if it was color?  Well, newspapers have used the process of dithering for quite a long time to fool the eye into think there are shades of gray.  Remember your journalism class?  If you take a look at a newspaper photo, it is really just a series of black dots - some close together, some far apart.  Fax images use this same principle.


Compression

Since hard drives are almost always full, compressing an image into a smaller format is very important.  An uncompressed image file is typically a megabyte per page. How are images compressed?

The fax machine is a scanner that scans a page and creates an image.  It then faxes the image over the telephone line.  To speed up the faxing process, since long distance phone charges are expensive, a standard fax compression method was designed:  CCITT Group 3 - 1 dimensional (CCITT G3-1D).  This method is a lossless compression algorithm meaning when you compress and then de-compress an image, no information or detail is lost.  Print-2-Image produces this popular format and refers to it as: TIFF -  GAMMA CCITT Group 3 - 1D.


Understanding Image File Formats

Some familiarity with these formats can be useful when routing faxes to non-Windows users.  There are several standard formats used for storing images, including:

•	Standard TIFF - This uncompressed TIFF format is often used by scanner applications.  It is usually supported by word processors as an Import Graphic Filter.

•	TIFF T4 - CCITT Group 3 - 1 dimensional compressed TIFF file:

(GammaLink compatible)

•	TIFF T4 bidim - CCITT Group 3 - 2 dimensional compressed TIFF file:

(GammaLink compatible).  It is slightly more compressed than the standard TIFF T4.

•	TIFF T6 - A highly compressed TIFF file, used in Group 4 faxing.  T6 files are smaller than T4 files, making T6 a format of good choice for image archiving.  T6 files are automatically converted when faxed or viewed by an Imecom module.

•	PCX/DCX - A image format used in many fax and imaging applications: (Intel CAS compatible).


Personalized User Settings

The P2IMAGE.INI file controls your personalized user profile settings.  This file is located in your Windows directory.  Whenever you enter the Print-2-Image - Setup dialog box, you are updating your personal settings so that next time you create an image, you will start where you left off.

Tip: To modify the INI text file manually, you can use any text editor such as Microsoft Write or Notepad.  From within a custom application, you may use the GetDefaultParameters and SetDefaultParameters functions outlined in the Technical Reference section of this manual.  You can also use the standard Windows API Get and WritePrivateProfile functions.


The P2IMAGE.INI file

All default user settings are stored in the P2IMAGE.INI file which is found in your Windows directory.

•	The INI file is a simple ASCII text file that is divided into sections.

•	Each section contains a group of entries.

•	For an entry, the text to the right of the equal sign is the default value for the entry.


Print-2-Image's Fax Printer Driver - Sample P2IMAGE.INI file
Sample P2IMAGE.INI file

[PrintModeOptions]

PrintMode=2

Mode-1-AppExe=C:\P2IMAGE4\vbp2iapi.exe

Mode-1-AppTitle=Print-2-Image Dynamic API demo

Mode-2-AppExe=showfax.exe

Mode-2-AppTitle=View a Fax

Mode-2-MsgAPIType=1

Mode-2-UseAppExe=1

[Print-2-Image-Main]

Print-2-Image=P-2-I TM (c)1994 by RPN; some software contained herein (c) 1992 by RPI/IMECOM

HelpFile=C:\P2IMAGE4\p2i.hlp

Orientation=1

PaperFormat=1

UseCustomLength=0

CustomPixelLength=800

UseWarningMessages=1

[FileOptions]

FileFormat=11

FineMode=1

ShowProgress=1

EmulationLaser=0

RenameSinglePage=0

FillOrderLeastSigBit=1

AlternateLowResMethod =0

[ImageOverlay]

WarningOnDimensionMisMatch=1

UseImageOverlay=0

ImageOverlayAllPages=0

ImageOverlayFile=c:\p2image4\p2ilogo.fax

[AutoFileMode]

UseAutoFileMode=0

LockAutoFileMode=1

AutoFileName=d:\access20\faxlibr\manual.tif

[Output]

LastFileName=D:\FONTTEST.DCX

LastFileNumPages=1

LastFileSource=Write - FONTTEST.WRI

LastFileFormat=11

LastDirectory=D:\


Personal Options -- The Four Sections

The Print-2-Image - Setup dialog box is divided into four sections:

1.	Modes of Operation

2.	Orientation and Paper Size

3.	Image Options

4.	Image Overlay Options

Tip: The OK push-button saves your changes to the P2IMAGE.INI file, while Cancel discards your changes.  The Help push-button will launch Print-2-Image's HelpFile to provide you with a on-line Windows help system.

Related Topics:

1. Modes of Operation

2. Orientation and Paper Size

3. Image Options -- Resolution and File Format

3. Image Options -- AutoFileMode

3. Image Options -- AutoFileMode Troubleshooting

4. Image Overlay Options


1. Modes of Operation

If all you want to do is create fax images, then use the Print To File mode.

The Session Manager mode is strictly for use with a custom, external application to provide application developer control over P-2-I's dynamic session-based parameters.  Please refer to the Appendix A for more information on how to use Session Manager.

Tip: Modes of Operation controls the [PrintModeOptions] section of the P2IMAGE.INI file.


2. Orientation and Paper Size

This section controls the paper size and orientation options.

Tip: Orientation and Paper Size controls the [Print-2-Image-Main] section of the P2IMAGE.INI file.

Tip: Try the Use Custom Length option to create images of a specified pixels length.  All images will be created using the same width of  1728 pixels.  The Letter paper size (81/2 x 11 inches) is equivalent to 1728 x 2160 pixels, and the custom length can range from 16 to 2160 pixels.


3. Image Options -- Resolution and File Format

This section controls the image resolution, image file format, and the appearance of the Show Progress dialog box during image creation.

Tip: Image Options controls the [FileOptions] section of the P2IMAGE.INI file.

Tip:  If you are using very fine lines and graphics in a source document, try the EmulationLaser option to help Print-2-Image recognize the extra detail.  However, this process will take slightly longer to create an image.  To change this option, you must modify the INI file directly by changing it to the number 1.

[FileOptions]

EmulationLaser=1


3. Image Options -- AutoFileMode

The UseAutoFileMode feature can be used to automate the image file naming process.  Typically, this feature is used when an external application expects the same file name to be produced in the same directory every time Print-2-Image creates a file.  An external application can also set a unique value for the AutoFileName option before printing a document by using the Print-2-Image's API functions.

Tip: Image Options -- AutoFileMode controls the [AutoFileMode] section of the P2IMAGE.INI file.

The UseAutoFileMode check box controls whether or not you want to be prompted to enter a file name every time you make an image, or whether you want the file name to be automatically set from the AutoFileName value.

Tip:  If the AutoFileName is blank, then Print-2-Image will generate a file name for you by using the source document's file name with the appropriate image file format extension, and in the drive and directory from the last Print-2-Image print session.

The Lock Name check box locks Print-2-Image in AutoFileMode and will always create the image file specified in the AutoFileName.  If the file already exists, it will be over-written.

Tip: If UseAutoFileMode is turned on (checked) and Lock Name is turned off (unchecked), then the Print To File dialog box will appear next time you run Print-2-Image.

If UseAutoFileName is turned off (unchecked), the Print-2-Image: Print To File dialog box will appear after you print to the Print-2-Image print driver.  In this manual mode, you must specify the file name and directory for your image, as well as the file format.

Tip: The [AutoFileMode] section of P2IMAGE.INI is controlled by these options.  AutoFileName can be any valid path and file name and file type, but the image file format is controlled by the Image File Format option.

Tip:  When using the AutoFileName option, the directory for your AutoFileName must already exist prior to image creation.  The directory is not automatically created for you.


3. Image Options -- AutoFileMode Troubleshooting

This dialog box is displayed if the file name that Print-2-Image uses is invalid.  Print-2-Image will not create a directory for you.


4. Image Overlay Options

Image Overlays or "WaterMark" allow you to merge any fax image supported by P-2-I including PCX, DCX, TIFF, and FAX with the output file(s) from a Print-2-Image print session.  This is very useful if you use a standard company logo and address and would like it stamped onto the first page or to every page of your output.

If the Use Image Overlay box is checked, Print-2-Image will merge the designated Image Overlay File Name to the output file(s).  You have control over which pages of the output you want the overlay to appear on by using the radio buttons: First Page Only, or Every Page of the output.

The View push-button will display the image overlay file in the associated application, e.g. ShowFax for fax images.

The "..." push-button will display a File Browse dialog box where you can select an image overlay file name from your hard disk.

Tip:  This Image Overlay feature is optional and can be turned off and on.


File Formats: Page numbering and File names

DCX and FAX: Multiple-page formats

TIFF, PCX and BMP: Single-page formats

CLP: Single-page format


DCX and FAX: Multiple-page formats

If the DCX or FAX multiple-page file format is selected, Print-2-Image will create an image using whatever file name you provide.

Tip: The File extension does NOT control the image file format.  The Image File Format is only controlled from the FileFormat= entry in the P2IMAGE.INI file.


TIFF, PCX and BMP: Single-page formats

If  a single-page format is selected (TIFF, PCX, or BMP), Print-2-Image will automatically create unique single-page file names.  Print-2-Image always creates 8 character file names using the first 4 letters that you provide, + "p" +  a pad with 3 trailing digits.

E.g.

Input File Name is YOURFILE.TIF ------->  YOURp001.TIF, YOURp002.TIF...

Input File Name is ABC.PCX ------------->  ABC0p001.PCX, ABC0p002.PCX...

Tip:  Print-2-Image will over-write any file(s) created with the same file name.

ShowFax and BMP files

ShowFax does not support and cannot display BMP image files.  To view BMP images, Print-2-Image will automatically substitute the PC PaintBrush (pbrush.exe) viewer for ShowFax.


CLP: Single-page format

If the Clipboard (CLP) file format is selected, Print-2-Image does not actually create a file on your hard disk.  It only loads the Windows Clipboard with data.  For a multiple page document, only the last page will reside in the Clipboard.


Viewing your image files -- or -- Transferring Control

View Image on Completion

After an image file(s) is created, this option controls whether you want to simply stop all processing, or launch an another application program:  By default, View Image on Completion launches the ShowFax image viewer.

However by changing the Mode-2-AppExe entry in the P2IMAGE.INI file, you can effectively transfer control to another external program. (i.e. launch a custom, user-defined program)

Tip:  You can launch any viewer or Windows application that you prefer.  Please refer to the Appendices for more information.  To change the viewer or application that is launched by Print-2-Image, use a text editor like Notepad.exe and change the Mode-2-AppExe entry in the P2IMAGE.INI file:  e.g. the default is Mode-2-AppExe=showfax.exe


Running ShowFax on Workstations

Fax Resource ShowFax from Resource Partners is a fast and powerful viewer for most image and fax formats, which supports many annotation features.

From every workstation where users might want to access ShowFax, run the program L:\P2IMAGE\SHOWFAX (where L:\P2IMAGE is the new directory where you just installed the Print-2-Image), using Program Manager's Run command.

This not only allows you to make sure the ShowFax program loads properly, but also adds a line to that user's WIN.INI file associating the .FAX extension with SHOWFAX.EXE.

From now on, double-clicking on a file with the .FAX or .DCX extension will result in ShowFax being started automatically, and the fax being displayed.


Using ShowFax

Fax Resource ShowFax is actually much more than a viewing tool (although it does that much faster than such applications as Windows PaintBrush). With ShowFax, you can also annotate faxes, add or delete pages, forward them to other e-mail users (with or without annotations).

Related Topics:

Use ShowFax to view incoming faxes


Use ShowFax to view incoming faxes

To view a fax (or any image file), double-click on the image filename in File Manager, or on the Fax Attachment icon if you received the file via e-mail.

Tip: You may also run ShowFax, and choose the Open option in the File menu to select the image file to display.

:

Initially, you will see a full page view of the fax received.  If the full page view makes the fax difficult to read, maximize the View window by clicking on the up-arrow at the upper-right corner of the View window.

Tip:  When the cursor is brought over the fax, it turns into a magnifying glass. You can click on any part of the image to magnify it.


Using the File menu:

The following commands are available in the File menu:

New - It is possible to create a new fax directly from the View module by typing a note with the "Annotation" feature, or by using "Paste" from the Clipboard.

Open - The Open command is used to retrieve and display images from your PC's hard drive.

Save - Use this command to Save the fax being viewed. An option is available to convert Objects to fax or store them separately on your hard drive.

Save as ... - Lets you save the fax being viewed under a new name, and optionally in a new image format.

Print - To print the fax being viewed on any network printer.

Related Topics:

Saving faxes in different formats and Object files

Understanding FAX Formats


Saving faxes in different formats and Object files

All annotations added to the fax being viewed (text, arrows and rectangles) are referred to as Objects.  If Objects are stored separately from the fax file itself, they can be further edited (double clicking on a text note, for instance, allows editing of the text), or deleted.

The File menu and the Save As menu item in the lets you save the fax being viewed in one of several formats, with Objects (text annotations, arrows, blocks etc.):

1.	Either in a separate Objects file (in which case they can be edited)

2.	Or the Objects are imbedded as part of the fax image itself.

On the other hand, if the Objects are stored onto the fax file itself, they are converted into the fax format.  They become part of the fax, and can no longer be edited in any way.


Understanding FAX Formats

There are several standard formats used for storing images, including:

•	Standard TIFF - This uncompressed TIFF format is often used by scanner applications.  It is usually supported by word processors as an Import Graphic Filter.

•	TIFF T4 - CCITT Group 3 - 1 dimensional compressed TIFF file: (GammaFax compatible)

•	TIFF T4 bidim - CCITT Group 3 - 2 dimensional compressed TIFF file: (GammaFax compatible).  It is slightly more compressed than the standard TIFF T4.

•	TIFF T6 - A highly compressed TIFF file, used in Group 4 faxing.  T6 files are smaller than T4 files, making T6 a format of choice for archiving.  T6 files are automatically converted when faxed or viewed by an Imecom module.

•	PCX/DCX - A image format used in many fax and imaging applications: (CAS compatible).

Some familiarity with these formats can be useful when routing faxes to non-Windows users.


Using the Edit Menu

This menu, and the Copy Image icon can be used to select an area from a viewed fax and to copy it to the clipboard for pasting to another area of a fax, or in other documents.

Tip:  When the icon is selected, a + pointer appears on the screen for use in outlining an area for copying.

Related Topics:

Copy, Cut, Paste and Select All


Copy, Cut, Paste and Select All

Copy - must be selected from the menu, after the area has been outlined, for transfer to the Clipboard to occur.

Cut - cannot be used with a fax, which is one graphic file, but Annotation provides a means to cover and replace any area on the viewed fax.

Tip:  Copying part of a fax can be resolution sensitive. It is best to copy from the Zoom view.

Paste - Choosing this command will copy whatever is on the Clipboard to the upper left-hand corner of the View module.  The material can be imported from any fax or other Windows document.  It will show up in a frame, which can be altered to fit the text or graphics.  To move the frame, hold down the left mouse button and drag the frame where you wish it to appear on the page.

Tip: The frame can be transparent, or block out other material.  Text from a word processing document can be altered after pasting to the facsimile document, and font types and sizes can be changed by double clicking on the frame, (see below for further instructions.)

Select All - When chosen in the menu, all Annotated items are selected.

Tip: To select all the Annotation entries in a chosen area, click on the Pointer icon (or Pointer in the Tools menu) and hold down the left mouse button to outline the area.  To select individual items, use the mouse, Ctrl key and Pointer, and click on desired Annotation items.


Using the Page menu

This menu, and the icons displayed below, contain a series of commands for efficient fax page manipulation and control:

Related Topics:

4-level Zoom, whole page, and View... sub-menu

Rotate in the Page menu & 4-way Rotation

Previous, Next and Go to in the Page menu


4-level Zoom, whole page, and View... sub-menu

Whole page  [image]  - The first view of a "newly received" or "opened" fax shows a full page view. This allows easier identification of an area to be selected for magnification.  The Whole Page view icon will return to this level of magnification any time you click the icon on the upper left of the Tool Bar.

Width - This view expands the screen image to fill the space that is available.  It can be selected from the Page menu or by clicking on the right mouse button.

Real size - This view, shows a selected portion of the fax received at actual size.  For a full screen view of the fax, use Windows "Maximize" feature (arrow in the upper right hand corner), to expand the View module to full screen size.

Zoom  [image]  - This option magnifies a selected area, from any other view, for closer inspection. The desired level and area of magnification can be selected in several ways.


Rotate in the Page menu & 4-way Rotation

The rotation features are provided to correct the orientation of faxes which may have been sent upside down. Rotation of 90°, 180° or 270° can be made with one mouse click to correct the fax perspective.

1.	The top left rotation icon, represents the first orientation of a viewed fax.  When chosen, it will also return the screen to that original view.

2.	The second rotation icon (upper right rotation icon) reverses the original orientation viewed on the screen (i.e., flips a fax received upside down), or rotates a left or right orientation.

3.	The third rotation icon (lower left icon), changes the original view so that what was the top is oriented to the left, or it reverses the orientation from right to left.

4.	The fourth rotation icon (lower right icon), changes the original view so that what was the top is oriented to the right, or reverses the orientation from left to right.


Previous, Next and Go to in the Page menu

Click on Forward or Reverse icons, or Previous or Next commands in the menu, to advance a multi-page fax one page at a time.

Choose the Go to command in the menu, and a dialog box will appear.  Enter the fax page desired, or open the drop-down list and select the appropriate page, and choose OK.

Insert a page - This command in the Page menu automatically inserts a blank page at the point in the fax that is being viewed.  These pages can be used for material moved from elsewhere in the fax, or for material copied from other documents or files "dragged and dropped" from the Windows File Manager.

Add a page - This command in the Page menu automatically inserts a blank page at the end of the fax.

Delete a page - Following confirmation, this command in the  Page menu deletes the current fax page being viewed.

Tip: Delete a Page is very helpful for changing a cover page for a fax that you wish to re-transmit.

Paging functions icons  [image]  and  [image]   -  These View a Fax features accelerate paging from one fax page to the next, in either direction.


Using Zoom (magnification)

The easiest way to enlarge the fax "view" displayed in the View module is to:

1.	Move your mouse pointer to the fax quadrant that is of interest.

2.	Click the right mouse button on the area of the fax you wish to see in more detail.  The  option box (Whole page, Width, Real size and Zoom) will appear directly below and to the right, of where you pointed.

3.	Select with the left mouse button the level of magnification you prefer, and the magnified area will appear on the screen.

Zoom Tip 1:  You can also make this selection by clicking on  Whole page, Width, Real size and Zoom in the Page/View menu, or return to a Full page view with the icon.  A magnifying glass pointer will appear when zoom is selected.  Use the mouse to drag it to the point of interest, and select by clicking either the right or left mouse button.  The left mouse button will also allow you to toggle between real size and zoom.

Zoom Tip 2: Another way to increase the size of the view without increasing the window, is to choose the Floating or None command from  the Options/Tool Box. This clears the area at the side of the view module that the box occupies.  With a floating tool bar, grab the dark area on the upper right to move it.


Using the Tools menu

Zoom  [image]  - When selected, the Zoom command or the Zoom icon, are both represented by a magnifying glass symbol on the screen.  When that symbol appears, the left mouse button toggles between zoom and real size views. The right mouse button, when pressed, presents all four views for selection.

Tip: The Full Page View icon will return you to that representation at any time.  See the description of Using zoom, above, for further information.

Move Image   [image]  - This command, and the Move image in frame icon , represented by the hand, allow you to quickly grab and move the image within the screen view being displayed.  When moving the image a shorter distance, the scroll bars provide an alternative.

Copy Image  [image]  - This command, or the Select for Clipboard copy (scissors icon) on the Tool Bar, turn the cursor into a + sign.  Use the symbol to outline an area you wish to copy.  Open the Edit menu and choose Copy to move it to the clipboard for pasting to another section of the fax or another document.

Pointer  [image]  - This command, or the Point and select icon, are used to select previously annotated material, (text, frames, arrows or pasted material.)

Text  [image]  - This command, or the Text Annotation Block icon on the Tool Bar, create a +     symbol on the screen.  Use the plus sign to outline the area you wish to outline for annotation.

Arrow  [image]  - This command, or the Point and Comment icon, is represented  on the screen by a + and a line with double ended arrow.  Place this plus sign where you wish to begin the line, and hold the left mouse button down while you extend it to the other point to which you wish to relate.

Frame  [image]  - When selected, this command or the Blocking/Enclosure Frame icon on the Tool Bar, will display a + and a frame on the screen.  Place the plus sign where you wish to begin the frame, and hold the left mouse button down while you enclose the area you are interested in.

Background - This sub-menu, within the Tools menu, provides a selection of backgrounds for Frame or Text annotation:

•	Transparent - shows the material beneath the area covered.

•	Black - turns the frame black.

•	White - blanks out the area beneath the frame and, in Text mode,  makes it possible to over-write the text on the viewed fax.

Line - This sub- menu, within the Tools menu, provides a selection of eleven formats for the frame and arrow lines for text annotation including:

•	None - causes the lines to disappear.

•	Dotted  - outlines the area with dots.

•	Filled - outlines the area with dashes.

•	Dashes and Dots  - a combination.

•	Density 1 to 8  - an increasing range of darker lines.

Tip: When no object is selected in the View module, items chosen in the Background and Line menus become the default settings for new objects.

Related Topics:

Clean-up a Fax - Erasing unwanted marks


Clean-up a Fax - Erasing unwanted marks

There are times when you would like an "eraser" to remove stray black marks or text from a fax.

One very common requirement is to remove the Calling Station Identifier (CSID) located at the top of a received fax.  An Eraser tool can be easily built by combining the Frame tool with the Tool - Background and Tool - Line options:

Eraser   =   Tools/Frame  [image]  +   Tools/Background - White   +   Tools/Line - None

From the Tools menu,

•	select Background  - White

•	select Line - None

•	select the Frame and create a white box over the unwanted area.


Text Annotation Techniques

Editing faxes can take a number of subtle forms, especially if material is cut and pasted to one of the Windows drawing programs for alteration, and then copied and re-pasted to the fax.

To Annotate a fax being viewed:

1.	Click on the Text icon  [image]  or select Text from the Tools menu.

2.	With the cursor now looking like the Text icon, click anywhere on the fax being viewed, and drag to outline an area. This area, which will contain the annotation, can be moved or expanded at any time.

3.	When you release the mouse button, the Text Annotation dialog box appears.

:

4.	Enter text from the keyboard.  The line of text will continue on a single line, unless you press the control and enter keys at the same time to start a new line. The length of a line on the screen will be determined by the size of the annotation block you have created.  If you wish to alter the text layout on the screen, select and expand or shrink the bounding box.

Tip: Ctrl+Enter will insert a new line.

5.	To set the Text Annotation to a specific font or style, highlight any part of the text and open the Fonts dialog box by clicking the Fonts button in the Text Annotation dialog box.

6.	Scroll to the desired font and point size in the Font and Size list boxes, and choose them. Then select Bold, Italic, Underline, or Strikeout as desired, from the Style check boxes.

7.	Choose OK to return to the Text Annotation dialog box.

8.	Place the cursor where you want it to be before beginning to enter text, or press Tab to return the cursor to the upper left hand corner.

Tip: When you wish to add to or alter text in an existing Text Annotation Block, double clicking on the selected block will re-open the dialog box.


Selecting, Re-sizing and Moving Annotated Objects

Click once and the selected symbol or material will display "handles" on the corners and in the center of the bounding box.  In the case of an arrow, handles appear at either end.

Tip: These handles can be used for re-sizing, (to stretch and shrink) symbols and pasted material.

When a symbol is selected, the Pointer can also be placed within the box, and with the left mouse button depressed, can be used to drag the symbol to a new location on the fax page being viewed.

Tip: With Annotated text, the box containing the text will re-size, but the fonts and point sizes will remain the same.  This can be helpful for changing justification on a line of text without using Ctrl+Enter in the Text Annotation dialog box.


Using the Options menu

Tool Box - can be attached to the inner, outer, or left hand corner of the View module.  It can be closed when not in use, or can be movable within the module.

None  - the Tool Box is closed.

Floating  - the Tool Box is outside the viewing area when opened, and inside if the module is expanded, using the Windows Maximize button.  A Tool Bar Grabber appears, upper right, in this mode that allows you to grab and drag the Tool Box to another location.

Fixed - the Tool Box is in the upper left hand corner of the View, reducing the viewing area when the view is not maximized.

Enhance black - Increases the darkness of a viewed fax.

Reverse Image -Text and graphics appear in white and background in black.

Short Menu/Long Menu - The menu changes based on what is selected.  The short menu does not show the Annotation icons on the Tool Box.


How Print-2-Image works

Before the Print-2-Image Print Session is initiated from a Third Party application like MS Word, it is the end user's or developer's responsibility to first select the printer driver: Print-2-Image on Fax as the default printer.

Once Print-2-Image on Fax is selected, several Default options can be modified from the "Printers" dialog box located in the Windows - Control Panel or from the Printer Setup dialog box available from within most Window applications.

Related Topics:

Print-2-Image - Setup options

What happens when you print the document

PrintMode Option 1: Session Manager

PrintMode 1 - Messaging Interface

PrintMode 1 - API WINDOW MESSAGES

PrintMode Option 2 : Print To File


Print-2-Image - Setup options

•	Print Modes - Two options: Print To File --or-- Session Manager

•	Orientation - Images can be printed either:  Portrait --or-- Landscape

•	Paper sizes - Letter, Legal, A4, A5, RamPage, Half Page, Custom Page Length (pixels)

•	Image options - Image File Format, Image Resolution, Auto File Name

•	Image Overlay options (or WaterMark)


What happens when you print the document

When you print from within a Third Party application such as MS Word, Print-2-Image uses the PrintMode radio button option to determine which action to take.  The options include:

1.	Session Manager : Before the image file(s) are created, launch an External application to allow control of the dynamic Session options (SpawnAndWait)

2.	Print To File : Print-2-Image uses the default settings located in the P2IMAGE.INI file.  After the image file(s) are created, optionally launch the ShowFax viewer or any other program.


PrintMode Option 1: Session Manager

Before any images are created:

1.   Print-2-Image launches (i.e. spawns) an External application specified in the Mode-1-AppExe option.  It can be any application written in Visual Basic, PowerBuilder, SQLWindows, Visual C++, Access, FoxPro, etc.

2.   Print-2-Image sends a Begin Print message to this spawned application.

3.   Print-2-Image starts a Print-2-Image Session visible as a minimized icon.

4.	Print-2-Image then waits for the External application to use the API function: AppModeAction which will update a status flag in Print-2-Image that triggers one of three possible actions.

Tip: By simply closing the Print-2-Image Session icon, the Print Session is automatically aborted.

Tip: To control the Session parameters, use the Print-2-Image API functions:  GetSessionParameters and SetSessionParameters.

Three Possible Actions

1.	Abort the print to image session and send the Abort message, then return to the Third Party application.

2.	Abort the print to image session and do not send the Abort message, then return to the Third Party application.

3.	Continue with the print to image session using the Session Parameters.


PrintMode 1 - Messaging Interface

Print-2-Image sends three messages to the External application at various points during the Print Session:

1.	BeginPrint: When the user initiates a new printing Session from a Third Party application.

2.	AbortPrint: When the printing Session is aborted, possibly due to some processing error.

3.	EndPrint: When a printing Session is completed successfully.


PrintMode 1 - API WINDOW MESSAGES

Global Const WM_BEGIN_PRINT	= &H400 + 4100

Global Const WM_ABORT_PRINT 	= &H400 + 4200

Global Const WM_END_PRINT 	= &H400 + 4300


PrintMode Option 2 : Print To File

This mode uses the default settings stored in the P2IMAGE.INI file to create the image files and can optionally spawn a specified External application (e.g. ShowFax) after the images are created, or simply return control to the Third Party application that started the print job.

After the image file(s) are created, and only if the View Image on Completion option is checked, (i.e. Mode-2-UseAppExe=1):

•	Print-2-Image will attempt to communicate with the Mode-2-AppExe application using Mode-2-AppTitle.

•	If Print-2-Image determines that it is not currently running (cannot find its Window title), Print-2-Image will automatically start it.

•	If Print-2-Image determines that it is currently running (finds its Window title), Print-2-Image will activate it and send it a Windows message as determined by Mode-2-MsgAPIType.


Set Parameters Functions

The External application can SET the status of any parameter by using the following two

functions that reside in the p2irpn4.dll:

•	SetSessionParameters (ByVal param as integer, ByVal sVal as string, ByVal iVal as integer) as integer

This SetSessionParameters function is only valid in Session Manager mode and must be used by your application to change any Session-based options.

•	SetDefaultParameters (ByVal param as integer, ByVal sVal as string, ByVal iVal as integer) as integer

This SetDefaultParameters function is available in either PrintMode and can be used to change the default value for any parameter option.  This function writes to the P2IMAGE.INI file.

Both functions use the following arguments:

param : an integer constant identifying the specific parameter to set

sVal:	the new string value of the parameter.  This is only used for string parameters, ignored for integer parameters

iVal:	the new integer value of the parameter. This is only used for integer parameters, ignored for string parameters

Both functions return the following results:

 1	The function was successful

-1	The function was not successful

Related Topics:

Valid API_ constants for Get and SetSessionParameters


Valid API_ constants for Get and SetSessionParameters

The following are the only valid Session parameter constants:

Tip: All other parameters are cannot be changed after a Print Session has begun.

• Constants	Type
• Global Const API_USE_CUSTOM_LENGTH = 105	integer
• Global Const API_CUSTOM_LENGTH_PIXELS = 106	integer
• Global Const API_FILEFORMAT = 201	integer
• Global Const API_FINERES = 202	integer
• Global Const API_SHOWPROGRESS = 203	integer
• Global Const API_RENAME_SINGLEPAGE = 204	integer
• Global Const API_LEAST_SIGBIT = 205	integer
• Global Const API_MODE_2_MSGAPITYPE = 309	integer
• Global Const API_OVERLAY_WARNING = 501	integer
• Global Const API_OVERLAY_USE = 502	integer
• Global Const API_OVERLAY_ALL_PAGES = 503	integer
• Global Const API_OVERLAY_FILENAME = 504	string
• Global Const API_AUTOFILE_FILENAME = 603	string


Get Parameters Functions

The External application can GET the status of any parameter by using the following two functions that reside in the p2irpn4.dll:

•	GetSessionParameters (ByVal param as integer, ByVal sVal as string, iLen as integer, iVal as integer) as integer

This GetSessionParameters function is only valid in Session Manager mode and must be used by your application to retrieve the current value for a Session-based parameter option.

•	GetDefaultParameters (ByVal param as integer, ByVal sVal as string, iLen as integer, iVal as integer) as integer

This GetDefaultParameters function is available in either PrintMode and can be used to change the default value for any parameter option.  This function reads from the P2IMAGE.INI file.

Both functions use the following arguments:

param : an integer constant identifying the specific parameter to get

sVal:	the string variable to put the returned value into.  This is only used for string parameters, ignored for integer parameters

iLen:	the length of the returned string

iVal:	the integer variable to put the returned value into. This is only used for integer parameters, ignored for string parameters

Both functions return the following results:

 1	The function was successful

-1	The function was not successful


AppModeAction function

The External application that is in a "SpawnAndWait" mode must use the Print-2-Image API function: AppModeAction to trigger the Abort or Continue event for the suspended Print Session.

•	AppModeAction (ByVal param as integer) as integer

The function accepts the following input parameter:

param : an integer identifying the event to trigger

Related Topics:

AppModeAction events - param options


AppModeAction events - param options

•	Global Const ID_RELEASE_PRINT = 1.  Definition: Continue with the Print Session

•	Global Const ID_ABORT_PRINT_WITH_MSG = -1.  Definition: Abort the Print Session and send AbortPrint message

•	Global Const ID_ABORT_PRINT_WITHOUT_MSG = -2.  Definition: Abort the Print Session and do NOT send AbortPrint message

The functions returns the following results:

 1	The function was successful

-1	The function was not successful - no Print Session in progress

-2	The function was not successful - Another Print-2-Image Session is already in progress, so continue with previous Print Session and abort the new Print Session.


GetImageInfo function

Any External application can issue this function call to retrieve the image information for an image file.  This function is useful for determining whether an image is portrait or landscape

•	GetImageInfo (ByVal szFileName as string, iQueryPage as integer, iPageCount as integer, iCompress as integer, iWidth as integer, iLength as integer, iHorzRes as integer, iVertRes as integer, iFO as integer, iKP as integer, iOrient as integer, ByVal lpSourceDoc as string) as integer

The function accepts the following input parameters:

•	szFileName : the input file name for the image in question

•	iQueryPage : For a multi-page image file, this is the page number of the szFileName that you wish to query.  The default is page number 1.  If  iQueryPage is greater than the maximum number of pages in szFileName, then the last page is queried.

The functions returns the following results:

 1	The function was successful

-1	The function was not successful - no image page was opened

Parameter	Description
iQueryPage	The page number actually queried
iPageCount	The number of pages in the input file
iCompress	Image compression (PCX, TIFF)
iWidth	Page width in pixels
iLength	Page length in pixels
iHorzRes	Horizontal resolution in DPI
iVertRes	Vertical resolution in DPI
iFO	Fill order - Least significant bit
iKP	K param - recurrence of Huffman encoded lines
iOrient	Orientation (Portrait (1) or Landscape (6)
lpSourceDoc	Source application and document used to create image


What is the P2IMAGE.INI file?

The P2IMAGE.INI file controls your personal user profile settings.  This file is located in your Windows directory.  To modify the ASCII text file directly, use any text editor such as Microsoft Write or Notepad.

From a Windows program, you can use Print-2-Image's GetDefaultParameters and SetDefaultParameters, or use the Windows API Get and Write Profile functions listed below.

It is important to know what parameter options are applicable for each section and entry.  This chapter will discuss how to use the options and program the INI file from a sample program.

Related Topics:

Visual Basic sample API code (VBP2IAPI.ZIP)

Window Profile String functions

Sample VB code using WritePrivateProfileString


Visual Basic sample API code (VBP2IAPI.ZIP)

To see source code for the VB API Demo application, please refer to the VBP2IAPI.ZIP file.


Window Profile String functions

Sample entries from a Visual Basic program: Setup1.glb

Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal lpAppName$, ByVal lpKeyName$, ByVal lpString$, ByVal lpFileName$)

Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpAppName$, ByVal lpKeyName$, ByVal lpDefault$, ByVal lpRetString$, ByVal nSize%, ByVal lpFileName$) As Integer


Sample VB code using WritePrivateProfileString

MsgBox APPNAME + " Updating your WIN.INI and creating a P2IMAGE.INI file in your Windows directory", 48, dialogCaption$

x% = WritePrivateProfileString("Print-2-Image-Main", "Orientation", "1", winDir$ & "p2image" & ".INI")


Appendix A: Technical Overview and API - Sample P2IMAGE.INI file
Sample P2IMAGE.INI file

[PrintModeOptions]

PrintMode=2

Mode-1-AppExe=C:\P2IMAGE4\vbp2iapi.exe

Mode-1-AppTitle=Print-2-Image Dynamic API demo

Mode-2-AppExe=showfax.exe

Mode-2-AppTitle=View a Fax

Mode-2-MsgAPIType=1

Mode-2-UseAppExe=1

[Print-2-Image-Main]

Print-2-Image=P-2-I TM (c)1994 by RPN; some software contained herein (c) 1992 by RPI/IMECOM

HelpFile=C:\P2IMAGE4\p2i.hlp

Orientation=1

PaperFormat=1

UseCustomLength=0

CustomPixelLength=800

UseWarningMessages=1

[FileOptions]

FileFormat=11

FineMode=1

ShowProgress=1

EmulationLaser=0

RenameSinglePage=0

FillOrderLeastSigBit=1

AlternateLowResMethod=0

[AutoFileMode]

UseAutoFileMode=0

LockAutoFileMode=1

AutoFileName=d:\access20\faxlibr\manual.tif

[ImageOverlay]

WarningOnDimensionMisMatch=1

UseImageOverlay=0

ImageOverlayAllPages=0

ImageOverlayFile=c:\p2image4\p2ilogo.fax

[Output]

LastFileName=D:\FONTTEST.DCX

LastFileNumPages=1

LastFileSource=Write - FONTTEST.WRI

LastFileFormat=11

LastDirectory=D:\


INI Section: PrintModeOptions

This section controls the PrintMode options:  Session Manager or Print To File

If all you want to do is create fax images, then use the Print To File mode.  Also, you have the choice of whether or not you want to view an image file after it is created (or transfer control to another external program).

Tip:  The Session Manager mode is strictly for use with any custom, external application to provide application developer control over Print-2-Image's dynamic session-based parameters.

Modes of Operation

The OK push-button saves your changes to the P2IMAGE.INI file, while Cancel discards your changes.  The Help push-button will launch Print-2-Image's HelpFile to provide you with a on-line Windows help system.

Related Topics:

Print To File mode and View Image on Completion


Print To File mode and View Image on Completion

After an image file(s) is created, this option controls whether you want to simply stop all processing, or launch an another application program:  By default, View Image on Completion launches the ShowFax image viewer.

However by changing the Mode-2-AppExe entry in the P2IMAGE.INI file, you can effectively transfer control to another external program. (i.e. launch a custom, user-defined program)

Tip:  You can launch any viewer or Windows application that you prefer.  Please refer to the Appendixes for more information.  To change the viewer or application that is launched by Print-2-Image, use a text editor like Notepad.exe and change the Mode-2-AppExe entry in the P2IMAGE.INI file:  e.g. the default is Mode-2-AppExe=showfax.exe


PrintModeOptions: API_ parameter constants

[PrintModeOptions]

PrintMode=2

Mode-1-AppExe=C:\P2IMAGE4\vbp2iapi.exe

Mode-1-AppTitle=Print-2-Image Dynamic API demo

Mode-2-AppExe=showfax.exe

Mode-2-AppTitle=View a Fax

Mode-2-MsgAPIType=1

Mode-2-UseAppExe=1

Constants	Type
Global Const API_PRINT_MODE = 301	integer
Global Const API_MODE_1_APPEXE = 302	string
Global Const API_MODE_1_APPTITLE = 303	string
Global Const API_MODE_2_APPEXE = 304	string
Global Const API_MODE_2_APPTITLE = 305	string
Global Const API_MODE_2_USE = 308	integer
Global Const API_MODE_2_MSGAPITYPE = 309	integer

Tip: To prevent an end-user from accidentally changing the more complex INI entries, selected INI entries have been intentionally hidden from this Setup screen.  The only entries that can be changed by the Print-2-Image - Setup screen are the PrintMode and Mode-2-UseAppExe entries.

Related Topics:

API_PRINT_MODE options

API_MODE_1_APPEXE option

API_MODE_1_APPTITLE option

API_MODE_2_APPEXE option

API_MODE_2_APPTITLE option

API_MODE_2_USE options

API_MODE_2_MSGAPITYPE options

API_MODE_2_MSGAPITYPE window messages


API_PRINT_MODE options

Global Const ID_PRINTMODE_1 = 1

Global Const ID_PRINTMODE_2 = 2

1	Session Manager: Before the images are created, launch an External application to allow control of the dynamic Session options (SpawnAndWait)

2	Print To File: Create the image files and launch the viewer or any program after the images are created


API_MODE_1_APPEXE option

Session Manager mode -- Any valid string containing a DOS drive, directory and filename and extension.  e.g. Mode-1-AppExe=C:\P2IMAGE4\vbp2iapi.exe


API_MODE_1_APPTITLE option

Session Manager mode -- Any valid string containing an application's Windows title or caption.  The FindWindow function will use this value when searching for the Window handle of a running Mode-1-UseAppExe.  e.g. Mode-1-AppTitle=Print-2-Image Dynamic API demo


API_MODE_2_APPEXE option

Print To File mode -- Any valid string containing a DOS drive, directory and filename and extension.  e.g. Mode-2-AppExe=C:\P2IMAGE4\showfax.exe


API_MODE_2_APPTITLE option

Print To File mode -- Any valid string containing an application's Windows title or caption.  The FindWindow function will use this value when searching for the Window handle of a running Mode-2-UseAppExe.  e.g. Mode-2-AppTitle=View a Fax


API_MODE_2_USE options

Print To File mode -- launch or do not launch the Mode-2-UseAppExe after image(s) are created.

Global Const ID_ON = 1

Global Const ID_OFF = 0


API_MODE_2_MSGAPITYPE options

Print To File mode -- When the Mode-2-AppExe application is already running in Windows, Print-2-Image will attempt to communicate with the Mode-2-AppExe.  The goal is to "inform" the program that an image has been created.  The Mode-2-AppExe program can then read the P2IMAGE.INI to retrieve information concerning the [Output] - Last File details.

For Visual Basic, we added Keyup, KeyDown, and Double-click ACTIONS to the messaging API.  These options were implemented since Visual Basic does not permit a programmer to declare a programmer-defined windows message.  However, several third party message trapping VBXs are now available.

For Visual Basic, we recommend Mode-2-MsgAPIType=2 for KeyUp ACTION trapping.  However, in Gupta SQLWindows or Visual C++, we recommend that you use a programmer-defined windows message, Mode-2-MsgAPIType=1 --> 0x400 + 4000.

Tip:  The default API-type is Mode-2-MsgAPIType=1

Constants	Type
Global Const ID_P2I_API0 = 0	Launch application every time, no messaging
Global Const ID_P2I_API1 = 1	user defined + 4000   (default)
Global Const ID_P2I_API2 = 2	keyup
Global Const ID_P2I_API3 = 3	double click
Global Const ID_P2I_API4 = 4	key down
Mode-2-MsgAPIType=0	* forces the command line API everytime
Mode-2-MsgAPIType=1	* if Mode-2-AppExe running, post Pam user message
Mode-2-MsgAPIType=2	* if Mode-2-AppExe running, post KeyUp action
Mode-2-MsgAPIType=3	* if Mode-2-AppExe running, post Double-click action
Mode-2-MsgAPIType=4	* if Mode-2-AppExe running, post KeyDown action


API_MODE_2_MSGAPITYPE window messages

Constants	Type
Global Const WM_P2I_API1 = &H400 + 4000	User defined + 4000
Global Const WM_P2I_API2 = &H101	Key up
Global Const WM_P2I_API3 = &H203	Double click
Global Const WM_P2I_API4 = &H100	Key down


INI Section: Print-2-Image-Main

The [Print-2-Image-Main] section controls the paper size and orientation options.

Tip: Try the Use Custom Length option to create images of a specified pixels length.  All images will be created using the same width of 1728 pixels.  The Letter paper size (81/2 x 11 inches) is equivalent to 1728 x 2160 pixels and the Custom Length can range from 16 to 2160 pixels.

Tip:  WARNING - THIS SECTION ONLY:

You MUST use the PPRTR functions of Visual Basic/ACCESS to control the orientation and paper sizes. **  If you update the P2IMAGE.INI yourself, they will be ignored (see the PPRTR zip file for more information).


Print-2-Image-Main: API_ parameter constants

[Print-2-Image-Main]

Print-2-Image=P-2-I TM (c) 1994 by RPN; some software contained herein (c) by RPI/IMECOM 1992

Orientation=1

PaperFormat=1

HelpFile=C:\P2IMAGE4\p2i.hlp

UseCustomLength=0

CustomPixelLength=800

UseWarningMessages=1

Constants	Type
Global Const API_COPYRIGHT = 101	string
Global Const API_ORIENTATION = 102	integer
Global Const API_PAPERSIZE = 103	integer
Global Const API_HELPFILE = 104	string
Global Const API_USE_CUSTOM_LENGTH = 105	integer
Global Const API_CUSTOM_LENGTH_PIXELS = 106	integer
Global Const API_USE_WARNING_MESSAGES = 107	integer
Related Topics:

API_ORIENTATION options

API_PAPERSIZE options

API_HELPFILE option

API_USE_CUSTOM_LENGTH options

API_CUSTOM_LENGTH_PIXELS options

API_USE_WARNING_MESSAGES options


API_ORIENTATION options

Global Const ID_PORTRAIT = 1

Global Const ID_LANDSCAPE = 2


API_PAPERSIZE options

Constants	Paper Size
Global Const DMPAPER_LETTER = 1	Letter 8 1/2 x 11 in
Global Const DMPAPER_LEGAL = 5	Legal 8 1/2 x 14 in
Global Const DMPAPER_A4 = 9	A4 210 x 297 mm
Global Const DMPAPER_A5 = 11	A5 148 x 210 mm
Global Const DMPAPER_RAMPAGE = 257	RamPage 8 1/2 x 22 inch
Global Const DMPAPER_JAPANESE = 258	Half-page 8 1/2 x 5 1/2 inch"


API_HELPFILE option

Any string containing a valid DOS drive, directory and filename and extension.

e.g. c:\p2image4\p2i.hlp


API_USE_CUSTOM_LENGTH options

Global Const ID_ON = 1

Global Const ID_OFF = 0


API_CUSTOM_LENGTH_PIXELS options

The value can be any integer from 16 to 2160.  The Intel CAS Logo page length is 800 pixels.

Global Const ID_CUSTOM_LENGTH_MIN_PIXELS = 16

Global Const ID_CUSTOM_LENGTH_PIXELS_CASLOGO = 800

.


API_USE_WARNING_MESSAGES options

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Allow user to see and respond to any warning or error message boxes

•	0 -- Prevent display of all message boxes.  Use for automated processing where waiting for a human to respond to a message box is undesirable.


INI Section: FileOptions

This [FileOptions] section of P2IMAGE.INI controls the image resolution, image file format, and the appearance of the Show Progress dialog box during image creation.


FileOptions: API_ parameter constants

[FileOptions]

FileFormat=11

FineMode=1

ShowProgress=1

RenameSinglePage=0

FillOrderLeastSigBit=1

EmulationLaser=0

AlternateLowResMethod=0

Constants	Type
Global Const API_FILEFORMAT = 201	integer
Global Const API_FINERES = 202	integer
Global Const API_SHOWPROGRESS = 203	integer
Global Const API_RENAME_SINGLEPAGE = 204	integer
Global Const API_LEAST_SIGBIT = 205	integer
Global Const API_LASER_EMULATION= 207	integer
Global Const API_ALT_LOWRES_METHOD = 208	integer
Related Topics:

API_FILEFORMAT - Multi-page image formats

API_FILEFORMAT - Single page image formats

API_FINERES options

API_SHOWPROGRESS options

API_RENAME_SINGLEPAGE options (TIFF or PCX)

API_LEAST_SIGBIT options

API_LASER_EMULATION options

API_ALT_LOWRES_METHOD options


API_FILEFORMAT - Multi-page image formats

Global Const ID_MULTI_TIFFT4_G31D = 4

Global Const ID_MULTI_TIFFT4_G32D = 6

Global Const ID_MULTI_TIFFT6_G41D = 5

Global Const ID_MULTI_DCX = 11

Global Const ID_MULTI_TIFFT4_G31D_IF = 13

Global Const ID_MULTI_TIFFT4_G32D_IF = 15

Global Const ID_MULTI_TIFFT6_G41D_IF = 14

Global Const ID_MULTI_TIFFT4_G31D_TEXT = "FAX - Tiff T4, G3-1D"

Global Const ID_MULTI_TIFFT4_G32D_TEXT = "FAX - Tiff T4, G3-2D"

Global Const ID_MULTI_TIFFT6_G41D_TEXT = "FAX - Tiff T6, G4-1D"

Global Const ID_MULTI_DCX_TEXT = "DCX - Intel (CAS)"

Global Const ID_MULTI_TIFFT4_G31D_IF_TEXT = "FAX - Tiff T4, G3-1D Inverted Fill order"

Global Const ID_MULTI_TIFFT4_G32D_IF_TEXT = "FAX - Tiff T4, G3-2D Inverted Fill order"

Global Const ID_MULTI_TIFFT6_G41D_IF_TEXT = "FAX - Tiff T6, G4-1D Inverted Fill order"


API_FILEFORMAT - Single page image formats

Global Const ID_SINGLE_PCX = 10

Global Const ID_SINGLE_TIF_GAMMA_G31D = 54

Global Const ID_SINGLE_TIF_GAMMA_G32D = 56

Global Const ID_SINGLE_TIF_G41D = 55

Global Const ID_SINGLE_TIF_HUFFMAN = 8

Global Const ID_SINGLE_TIF_UNCOMPRESSED = 7

Global Const ID_SINGLE_BMP = 2

Global Const ID_SINGLE_CLP = 3

Global Const ID_SINGLE_PCX_TEXT = "PCX - PaintBrush (CAS)"

Global Const ID_SINGLE_TIF_GAMMA_G31D_TEXT = "TIF - GAMMA Group 3 - 1 dim"

Global Const ID_SINGLE_TIF_GAMMA_G32D_TEXT = "TIF - GAMMA Group 3 - 2 dim"

Global Const ID_SINGLE_TIF_G41D_TEXT = "TIF - Group 4 - 1 dim"

Global Const ID_SINGLE_TIF_HUFFMAN_TEXT = "TIF - Tiff Huffman PAO, CCITT"

Global Const ID_SINGLE_TIF_UNCOMPRESSED_TEXT = "TIF - Tiff Uncompressed"

Global Const ID_SINGLE_BMP_TEXT = "BMP - Windows Bitmap"

Global Const ID_SINGLE_CLP_TEXT = "CLP - Print to Win Clipboard"


API_FINERES options

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- High Resolution	200 x 200 DPI

•	0 -- Low Resolution	200 x 100 DPI


API_SHOWPROGRESS options

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Show the Progress box while image is created.

•	0 -- Don't show progress box.


API_RENAME_SINGLEPAGE options (TIFF or PCX)

This RenameSinglePage option allows you to control the File Naming Convention.  However, this option only applies to the printing of Single-page source documents that produce only one output image file.

When printing a Single-page source document using a single-page file format like TIFF or PCX, you may want the image file created to have a file name that is exactly what you entered.  In other words, you do NOT want P-2-I to create the file using the 4 characters + "p" + 3 digit naming convention.

•	If you set RenameSinglePage=0, the file name used will be exactly what you entered.

•	If you set this option to 1, then the single-page output file will be created with a file name that uses a page number, e.g. YOURFILE.PCX  ---> YOURp001.PCX.

Tip:  If TIFF or PCX is selected and the source is a multi-page document, the output files will always be created with page numbers.  To change this option, you must edit the INI file using a text editor. (BMP files will always create file names with page numbers)

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Rename single page to include digits, i.e. YOURp001.PCX.

•	0 -- Don't rename when the source document is only a single page.


API_LEAST_SIGBIT options

This options gives you the flexibility to control the FillOrder for an image.  Certain fax companies like GammaLink require that all images be of a certain type: GammaLink supports CCITT Group 3 -1 dimensional TIFF images with the FillOrder of Least Significant bit.

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- The leftmost bit of the bitmap is the Least Significant bit of the byte.

•	0 -- The leftmost bit of the bitmap is the Most Significant bit of the byte.


API_LASER_EMULATION options

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Use Laser emulation while creating images.  This is slower, but useful for fine lines

•	0 -- Don't use Laser Emulation.

Tip:  If you are using very fine lines and graphics in a source document, try the EmulationLaser option to help Print-2-Image recognize the extra detail.  However, this process will take slightly longer to create an image.  To change this option, you must modify the INI file directly by changing it to 1.


API_ALT_LOWRES_METHOD options

If you have problems creating standard (200x100) fax images from your Windows product like Quark, turn this feature on.  This method always creates a 200x200 image first, and then modifies it to produce a 200x100 image.

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Use Alternate Low Resolution method.

•	0 -- Don't use.

Tip: To prevent an end-user from accidentally changing the more complex INI entries have been intentionally hidden from the Print-2-Image - Setup screen.  To change these options, you can edit the INI file using a text editor:

[FileOptions]

EmulationLaser=0

RenameSinglePage=0

FillOrderLeastSigBit=1

AlternateLowResMethod=0


INI Section: AutoFileMode

This section of the P2IMAGE.INI controls whether you want to be prompted to enter a file name every time you make an image.  The UseAutoFileMode check box controls whether or not you want to be prompted to enter a file name every time you make an image, or whether you want the file name to be automatically set from the AutoFileName value.

The UseAutoFileMode feature can be used to automate the image file naming process.  Typically, this feature is used when an external application expects the same file name to be produced in the same directory every time Print-2-Image creates a file.  The external application can also set the AutoFileName option before each print job using API functions.

Tip:  If the AutoFileName is blank, then Print-2-Image will generate a file name for you by using the source document's file name with the appropriate image file format extension, and in the drive and directory from the last Print-2-Image Print Session.

If you do not UseAutoFileMode, a Print-2-Image: Print To File dialog box will appear after you print to the Print-2-Image print driver.  In this mode, you can specify a file name and directory for your image, as well as the file format.


AutoFileMode: API_ parameter constants

[AutoFileMode]

UseAutoFileMode=1

LockAutoFileMode=1

AutoFileName=c:\p2image\test.dcx

Constants	Type
Global Const API_AUTOFILE_USE = 601	integer
Global Const API_AUTOFILE_LOCK = 602	integer
Global Const API_AUTOFILE_FILENAME = 603	string
Related Topics:

API_AUTOFILE_USE options

API_AUTOFILE_LOCK options

API_AUTOFILE_FILENAME option


API_AUTOFILE_USE options

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Use AutoFileNaming mode to create a file as specified in the AutoFileName= entry.

•	0 -- Don't use AutoFileNaming, but prompt the user with: "Print To File" dialog box.


API_AUTOFILE_LOCK options

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Lock UseAutoFileMode.  After image is created, do not reset UseAutoFileMode to 0.

•	0 -- Do not lock UseAutoFileMode.

Tip:  Lock Name will always create the image file specified in the Auto File Name.  If the file already exists, it will be over-written.


API_AUTOFILE_FILENAME option

Any valid, fully-qualified DOS file path that will be used to create a DCX, PCX or TIFF file.

Tip:  AutoFileName can be any valid path and file name and file type. However, the image file format is controlled by the FileFormat=  entry in the P2IMAGE.INI file.  When using the AutoFileName option, the directory for your AutoFileName must already exist prior to image creation.  The directory is not automatically created for you.


INI Section: ImageOverlay

Image Overlays or "WaterMark" allow you to "merge" any fax image with the output file(s) from a Print-2-Image Print Session.  You have the option to turn this feature off and on.  If the Use Image Overlay box is checked (ON), you can overlay the designated overlay file name to just the First Page of the output file, or to Every Page of the output.

The View push-button will display the overlay file in the associated application, e.g. ShowFax for fax images.

The "..." push-button will display a File Browse dialog box where you can select an image overlay file name from your hard disk.


ImageOverlay: API_ parameter constants

[ImageOverlay]

WarningOnDimensionMisMatch=1

UseImageOverlay=0

ImageOverlayAllPages=0

ImageOverlayFile=c:\p2image4\p2ilogo.fax

Constants	Type
Global Const API_OVERLAY_WARNING = 501	integer
Global Const API_OVERLAY_USE = 502	integer
Global Const API_OVERLAY_ALL_PAGES = 503	integer
Global Const API_OVERLAY_FILENAME = 504	string
Related Topics:

API_OVERLAY_WARNING options

API_OVERLAY_USE  options

API_OVERLAY_ALL_PAGES options

API_OVERLAY_FILENAME option


API_OVERLAY_WARNING options

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Display a warning box if the orientation or dimension of the image overlay file does not match with the new output of a Print-2-Image Print Session.

•	0 -- Do not display warning message box.


API_OVERLAY_USE  options

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Use Image Overlay feature.

•	0 -- Do not use.


API_OVERLAY_ALL_PAGES options

Global Const ID_ON = 1

Global Const ID_OFF = 0

•	1 -- Overlay the ImageOverlayFile onto every page.

•	0 -- Only overlay the ImageOverlayFile onto the first page.


API_OVERLAY_FILENAME option

Any valid DCX, PCX or TIFF file name containing a DOS drive, directory and filename and extension, e.g. c:\p2image4\puzzle.fax


INI Section: Output and API_ parameter constants

This section is used by P-2-I to record the information concerning the Last File that was created.  Your application can read this section and retrieve valuable information.

[Output]

LastFileName=D:\TEST.DCX

LastFileNumPages=2

LastFileSource=Notepad - README.TXT

LastFileFormat=11

LastDirectory=D:\

Constants	Type
Global Const API_LASTFILENAME = 401	string
Global Const API_LASTFILEPAGES = 402	integer
Global Const API_LASTFILESOURCE = 403	string
Global Const API_LASTFILEFORMAT = 404	integer
Global Const API_LASTFILEDIR = 405	string
Related Topics:

API_LASTFILENAME option

API_LASTFILEPAGES option

API_LASTFILESOURCE option

API_LASTFILEFORMAT option

API_LASTFILEDIR option


API_LASTFILENAME option

Will be any valid string containing a DOS drive, directory and filename and extension.

e.g. c:\p2image\temp.dcx


API_LASTFILEPAGES option

Will be a number reflecting the total number of pages produced during the last session, e.g. 5


API_LASTFILESOURCE option

Will be any valid string containing the name of the source document used by P-2-I.

e.g. Write - README.WRI


API_LASTFILEFORMAT option

Will be a number reflecting any valid File Format, see FileOptions section above.  e.g. 11 - DCX file format


API_LASTFILEDIR option

This option saves the name of the last directory where an image file was created.  ShowFax uses this entry to help you save your images in the same place every time, e.g. D:\


How does P-2-I launch an External Process like ShowFax in PrintMode option 2?

After creating an image file, the last process that Print-2-Image executes is a GetPrivateProfileString of the Mode-2-AppExe entry.  If Mode-2-UseAppExe is turned on (1), then Print-2-Image will do some special processing to transfer control to an external process/program.

Related Topics:

The FindWindow function

FindWindow and Non-NULL Window Handle

FindWindow and NULL Window Handle


The FindWindow function

If the Mode-2-AppTitle entries have non-blank values, Print-2-Image will search Windows for all running applications using a FindWindow function call.

Declare Function FindWindow Lib "User" (Class As Any, Title As Any) As Integer


FindWindow and Non-NULL Window Handle

•	NON-NULL Window Handle:	If Print-2-Image finds an application that is running with the designated Title, a Windows message is sent to the application's window handle.

The entry in the P2IMAGE.INI file for Mode-2-MsgAPIType determines the Message API type:

WM_P2I_API1	0x400 + 4000	// pam user

WM_P2I_API2	0x0101	// KeyUp

WM_P2I_API3	0x0203 	// Double-click

WM_P2I_API4	0x0100	// KeyDown

 Tip: It is the responsibility of the external application to trap this message and issue a GetDefaultParameters API call or GetPrivateProfileString to retrieve the LastFileName entry from the P2IMAGE.INI file.


FindWindow and NULL Window Handle

•	NULL Window Handle:	If P-2-I does NOT find an application that is running with the designated Title, P-2-I executes the Mode-2-AppExe using the LastFileName= entry as the command line argument.

Tip: To force P-2-I to always launch the Mode-2-AppExe without executing the FindWindow logic, do NOT place any values next to the Mode-2-AppTitle entries.   Also, you may use Mode-2-MsgAPIType=0.


Appendix B:  Manual Installation - Technical Support
Technical Support

For technical support, product and order information, contact

Resource Partners North

2157 Marc Lane, Suite 100

Burlington, Ontario  L7M 3W6  Canada

tel.  905-336-2872

fax. 905-336-3158

CompuServe: 74347,164


To Install Print-2-Image Manually

Using the Print-2-Image setup diskette:

1.	Create a P2IMAGE4 directory and copy the following files into this directory:

•	SHOWFAX.EXE

•	README.TXT

2.	Copy the following files into your Windows\System directory:

•	P2IRPN4.DLL

•	CTL3D.DLL

•	TRANSCOD.DLL

•	FAXIL.DRV

•	VBRUN300.DLL

3.	Edit your WIN.INI file and make the following changes:

Add the following section:

•	[Print-2-Image]

•	UserLib=C:\P2IMAGE4\P2IRPN4.DLL

Add the following entry to the Ports section:

•	[ports]

•	FAX=

Add the following entry to the PrinterPorts section:

•	[PrinterPorts]

•	Print-2-Image=FAXIL,FAX,15,45

Add the following entry to the devices section:

•	[devices]

•	Print-2-Image=FAXIL,FAX

4.	Finally, go to Control Panel, Printer Setup and select Print-2-Image on FAX as your printer.  You should see the Print-2-Image - Setup dialog box.  When you change any value and click on OK, the P2IMAGE.INI text file is updated (or created) in your Windows directory.

Tip: To prevent an end-user from accidentally changing the more complex INI entries, selected INI entries have been purposely hidden from this Setup screen.  The entries that cannot be changed by the Setup screen include:

[Print-2-Image-Main]

HelpFile=C:\P2IMAGE4\pas.hlp

UseWarningMessages=1

[FileOptions]

EmulationLaser=0

RenameSinglePage=0

FillOrderLeastSigBit=1

AlternateLowResMethod=0

[PrintModeOptions]

Mode-1-AppExe=C:\P2IMAGE4\vbp2iapi.exe

Mode-1-AppTitle=Print-2-Image Dynamic API demo

Mode-2-AppExe=showfax.exe

Mode-2-AppTitle=View a Fax

Mode-2-MsgAPIType=1

Mode-2-UseAppExe=1

[ImageOverlay]

WarningOnDimensionMisMatch=1


Installation Questions

Can I "Connect" Print-2-Image to a different Printer Port than "FAX"?

Why does PaintBrush load after creating an image?

Where can I find VBRUN300.DLL?


Can I "Connect" Print-2-Image to a different Printer Port than "FAX"?

Yes, The default printer port is FAX, but you may connect Print-2-Image to any printer port.  If you use Control Panel - Printer Setup, Connect, all required entries in the WIN.INI will be changed automatically.


Why does PaintBrush load after creating an image?

If you only purchased Print-2-Image (you don't have the Fax Resource ShowFax image viewer), then the install process sets the default viewer to PaintBrush.  You will probably want to change this application to a different viewer or to a custom application, so edit the P2IMAGE.INI file and change Mode-2-AppExe entry.

Also, ShowFax does not support and cannot display Windows BMP image files.  To view BMP images, Print-2-Image will automatically substitute the PC PaintBrush (pbrush.exe) viewer for ShowFax.


Where can I find VBRUN300.DLL?

If you retrieved Print-2-Image from CompuServe, VBRUN300.DLL may not be included.  VBRUN300.DLL is a required Microsoft dynamic link library that permits a Visual Basic program to run under Windows, and is used by the P-2-I INSTALL.EXE program.  If you are missing VBRUN300, then you may download it from CompuServe:

WINSHARE - LIB 1  [76711,22]  (also MSBASIC - LIB 5).

VBRUN3.ZIP/Bin  Bytes: 231424, 16-Jun-93

Title   : VBRUN300.DLL (ZIPPED)

Keywords: VBRUN300 VBRUN VISUAL BASIC

This file contains the VBRUN300.DLL as well as a minimal exe to satisfy the licensing agreement.


QuarkXPress Desktop Publishing Software

How can I prevent QuarkXPress from abending when I use Print-2-Image?

Print-2-Image now supports QuarkXPress desktop publishing software.  To prevent a General Protection Fault (GPF) under Windows, simply add the following line to the QUARK.INI (Print-2-Image is configured the same as for WINFAX)

[AlternatePrintMethod]

WINFAX=1

Print-2-Image=1

Also, if you need to generate standard resolution images (200x100), as opposed to Fax Fine (200x200), you will need to change the P2IMAGE.INI entry as follows:

[FileOptions]

AlternateLowResMethod=1


Complex Graphics

How can I prevent very fine lines from disappearing when I create an image?

Print-2-Image detects almost all lines and graphics in a source document.  However, there are rare occasions when a source document uses very thin lines and some lines are lost when the file is created.

The Print-2-Image printer driver has an option, "Laser Emulation for Fine Lines" that detects very thin lines and graphics.  To activate the Laser emulation processing, edit the P2IMAGE.INI file, and set the EmulationLaser=1.  Please note that it will take a little longer to create an image while using this feature.


External Applications and API

Can I substitute a different viewer or use my own application instead of ShowFax?

Absolutely.  All you have to do is edit the P2IMAGE.INI using a text editor like Notepad.exe and change the Mode-2-AppExe entry from ShowFax to your own Windows executable.  For a comprehensive API explanation, see the INI Section: PrintModeOptions section of this manual.  You can also review the VBP2IAPI.ZIP file that contains sample Visual Basic source code.